package net.lookyou.boot.demo.controller;


import lombok.extern.slf4j.Slf4j;
import net.lookyou.boot.demo.service.TestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class TestController {


    @Autowired
    private TestService testService;

    @GetMapping(value = "/test")
    public void test(){
        //打印trace和debug
        log.trace("trace信息");
        log.debug("debug信息");
        log.warn("warn信息");
        log.info("info信息");
        log.error("error信息");

        testService.sayHi();
    }
}
